using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VLMSCHAB
    {
        public DataRow Convert2LMSCHAB(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryLMSCHAB(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["LMSMANDANT"] = " ".PadRight(2 ); 
         dwReturn["LMSSCHABNR"] = " ".PadRight(13 ); 
         dwReturn["LMSSSTA"] = " ".PadRight(1 ); 
         dwReturn["LMSSTGRD"] = " ".PadRight(3 ); 
         dwReturn["LMSBESCH"] = " ".PadRight(30 ); 
         dwReturn["LMSGRAVNR"] = " ".PadRight(8 ); 
         dwReturn["LMSGRAVDAT"] = " ".PadRight(0 ); 
         dwReturn["LMSEXCLU"] = " ".PadRight(8 ); 
         dwReturn["LMSFILMNR"] = " ".PadRight(10 ); 
         dwReturn["LMSFIGLFD"] = " ".PadRight(0 ); 
         dwReturn["LMSBREITE"] = " ".PadRight(0 ); 
         dwReturn["LMSFEINH"] = " ".PadRight(0 ); 
         dwReturn["LMSDFLU"] = " ".PadRight(3 ); 
         dwReturn["LMSHLSLGE"] = " ".PadRight(0 ); 
         dwReturn["LMSBEDECK"] = " ".PadRight(0 ); 
         dwReturn["LMSUMFANG"] = " ".PadRight(0 ); 
         dwReturn["LMSRINGKZ"] = " ".PadRight(1 ); 
         dwReturn["LMSMTYP"] = " ".PadRight(8 ); 
         dwReturn["LMSBEM"] = " ".PadRight(50 ); 
         dwReturn["LMSLO"] = " ".PadRight(2 ); 
         dwReturn["LMSLB"] = " ".PadRight(2 ); 
         dwReturn["LMSLP"] = " ".PadRight(6 ); 
         dwReturn["LMSAUFBKZ"] = " ".PadRight(1 ); 
         dwReturn["LMSANZPART"] = " ".PadRight(0 ); 
         dwReturn["LMSGESMTR"] = " ".PadRight(0 ); 
         dwReturn["LMSWALZNR"] = " ".PadRight(10 ); 
         dwReturn["LMSRAPPH"] = " ".PadRight(0 ); 
         dwReturn["LMSRAPPB"] = " ".PadRight(0 ); 
         dwReturn["LMSSCHABTYP"] = " ".PadRight(1 ); 
         dwReturn["LMSHUELTYP"] = " ".PadRight(2 ); 
         dwReturn["LMSENDRTYP"] = " ".PadRight(2 ); 
         dwReturn["LMSDESS"] = " ".PadRight(10 ); 
         dwReturn["LMSPOS1"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS2"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS3"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS4"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS5"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS6"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS7"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS8"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS9"] = " ".PadRight(2 ); 
         dwReturn["LMSPOS10"] = " ".PadRight(2 ); 
         dwReturn["LMSBAUART"] = " ".PadRight(1 ); 
         dwReturn["LMSGRAVART"] = " ".PadRight(1 ); 
         dwReturn["LMSABDRDAT"] = " ".PadRight(0 ); 
         dwReturn["LMSABDRLNR"] = " ".PadRight(0 ); 
         dwReturn["LMSVOHA"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS1"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS2"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS3"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS4"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS5"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS6"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS7"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS8"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS9"] = " ".PadRight(4 ); 
         dwReturn["LMSSTEPS10"] = " ".PadRight(4 ); 
         dwReturn["LMSZUSTAND"] = " ".PadRight(4 ); 
         dwReturn["LMSANZSCHAB"] = " ".PadRight(1 ); 
         dwReturn["LMSREPDAT"] = " ".PadRight(0 ); 
         dwReturn["LMSZURDAT"] = " ".PadRight(0 ); 
         dwReturn["LMSFILLER"] = " ".PadRight(58 ); 
         dwReturn["LMSAENDZL"] = " ".PadRight(0 ); 
         dwReturn["LMSAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["LMSAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["LMSNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["LMSNEUDAT"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapLMSCHAB(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveLMSCHAB(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryLMSCHAB(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapLMSCHAB(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertLMSCHAB(dwLocal, ITXDBVERSION);
            }
            UpdateLMSCHAB(dwLocal);
        }
        public void InsertLMSCHAB(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO LMSCHAB(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryLMSCHAB(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM LMSCHAB WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM LMSCHAB  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "LMSCHAB";
            Return = Result;
            return Return;
        }
        public void DeleteLMSCHAB(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM LMSCHAB   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateLMSCHAB(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE LMSCHAB SET "
                    +"LMSMANDANT= :LMSMANDANT,"
                    +"LMSSCHABNR= :LMSSCHABNR,"
                    +"LMSSSTA= :LMSSSTA,"
                    +"LMSSTGRD= :LMSSTGRD,"
                    +"LMSBESCH= :LMSBESCH,"
                    +"LMSGRAVNR= :LMSGRAVNR,"
                    +"LMSGRAVDAT= :LMSGRAVDAT,"
                    +"LMSEXCLU= :LMSEXCLU,"
                    +"LMSFILMNR= :LMSFILMNR,"
                    +"LMSFIGLFD= :LMSFIGLFD,"
                    +"LMSBREITE= :LMSBREITE,"
                    +"LMSFEINH= :LMSFEINH,"
                    +"LMSDFLU= :LMSDFLU,"
                    +"LMSHLSLGE= :LMSHLSLGE,"
                    +"LMSBEDECK= :LMSBEDECK,"
                    +"LMSUMFANG= :LMSUMFANG,"
                    +"LMSRINGKZ= :LMSRINGKZ,"
                    +"LMSMTYP= :LMSMTYP,"
                    +"LMSBEM= :LMSBEM,"
                    +"LMSLO= :LMSLO,"
                    +"LMSLB= :LMSLB,"
                    +"LMSLP= :LMSLP,"
                    +"LMSAUFBKZ= :LMSAUFBKZ,"
                    +"LMSANZPART= :LMSANZPART,"
                    +"LMSGESMTR= :LMSGESMTR,"
                    +"LMSWALZNR= :LMSWALZNR,"
                    +"LMSRAPPH= :LMSRAPPH,"
                    +"LMSRAPPB= :LMSRAPPB,"
                    +"LMSSCHABTYP= :LMSSCHABTYP,"
                    +"LMSHUELTYP= :LMSHUELTYP,"
                    +"LMSENDRTYP= :LMSENDRTYP,"
                    +"LMSDESS= :LMSDESS,"
                    +"LMSPOS1= :LMSPOS1,"
                    +"LMSPOS2= :LMSPOS2,"
                    +"LMSPOS3= :LMSPOS3,"
                    +"LMSPOS4= :LMSPOS4,"
                    +"LMSPOS5= :LMSPOS5,"
                    +"LMSPOS6= :LMSPOS6,"
                    +"LMSPOS7= :LMSPOS7,"
                    +"LMSPOS8= :LMSPOS8,"
                    +"LMSPOS9= :LMSPOS9,"
                    +"LMSPOS10= :LMSPOS10,"
                    +"LMSBAUART= :LMSBAUART,"
                    +"LMSGRAVART= :LMSGRAVART,"
                    +"LMSABDRDAT= :LMSABDRDAT,"
                    +"LMSABDRLNR= :LMSABDRLNR,"
                    +"LMSVOHA= :LMSVOHA,"
                    +"LMSSTEPS1= :LMSSTEPS1,"
                    +"LMSSTEPS2= :LMSSTEPS2,"
                    +"LMSSTEPS3= :LMSSTEPS3,"
                    +"LMSSTEPS4= :LMSSTEPS4,"
                    +"LMSSTEPS5= :LMSSTEPS5,"
                    +"LMSSTEPS6= :LMSSTEPS6,"
                    +"LMSSTEPS7= :LMSSTEPS7,"
                    +"LMSSTEPS8= :LMSSTEPS8,"
                    +"LMSSTEPS9= :LMSSTEPS9,"
                    +"LMSSTEPS10= :LMSSTEPS10,"
                    +"LMSZUSTAND= :LMSZUSTAND,"
                    +"LMSANZSCHAB= :LMSANZSCHAB,"
                    +"LMSREPDAT= :LMSREPDAT,"
                    +"LMSZURDAT= :LMSZURDAT,"
                    +"LMSFILLER= :LMSFILLER,"
                    +"LMSAENDZL= :LMSAENDZL,"
                    +"LMSAENDBEN= :LMSAENDBEN,"
                    +"LMSAENDDAT= :LMSAENDDAT,"
                    +"LMSNEUBEN= :LMSNEUBEN,"
                    +"LMSNEUDAT= :LMSNEUDAT,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("LMSMANDANT", OracleType.NVarChar).Value = dwData["LMSMANDANT"].ToString(); 
          or1.Parameters.Add("LMSSCHABNR", OracleType.NVarChar).Value = dwData["LMSSCHABNR"].ToString(); 
          or1.Parameters.Add("LMSSSTA", OracleType.NVarChar).Value = dwData["LMSSSTA"].ToString(); 
          or1.Parameters.Add("LMSSTGRD", OracleType.NVarChar).Value = dwData["LMSSTGRD"].ToString(); 
          or1.Parameters.Add("LMSBESCH", OracleType.NVarChar).Value = dwData["LMSBESCH"].ToString(); 
          or1.Parameters.Add("LMSGRAVNR", OracleType.NVarChar).Value = dwData["LMSGRAVNR"].ToString(); 
          or1.Parameters.Add("LMSGRAVDAT", OracleType.NVarChar).Value = dwData["LMSGRAVDAT"].ToString(); 
          or1.Parameters.Add("LMSEXCLU", OracleType.NVarChar).Value = dwData["LMSEXCLU"].ToString(); 
          or1.Parameters.Add("LMSFILMNR", OracleType.NVarChar).Value = dwData["LMSFILMNR"].ToString(); 
          or1.Parameters.Add("LMSFIGLFD", OracleType.NVarChar).Value = dwData["LMSFIGLFD"].ToString(); 
          or1.Parameters.Add("LMSBREITE", OracleType.NVarChar).Value = dwData["LMSBREITE"].ToString(); 
          or1.Parameters.Add("LMSFEINH", OracleType.NVarChar).Value = dwData["LMSFEINH"].ToString(); 
          or1.Parameters.Add("LMSDFLU", OracleType.NVarChar).Value = dwData["LMSDFLU"].ToString(); 
          or1.Parameters.Add("LMSHLSLGE", OracleType.NVarChar).Value = dwData["LMSHLSLGE"].ToString(); 
          or1.Parameters.Add("LMSBEDECK", OracleType.NVarChar).Value = dwData["LMSBEDECK"].ToString(); 
          or1.Parameters.Add("LMSUMFANG", OracleType.NVarChar).Value = dwData["LMSUMFANG"].ToString(); 
          or1.Parameters.Add("LMSRINGKZ", OracleType.NVarChar).Value = dwData["LMSRINGKZ"].ToString(); 
          or1.Parameters.Add("LMSMTYP", OracleType.NVarChar).Value = dwData["LMSMTYP"].ToString(); 
          or1.Parameters.Add("LMSBEM", OracleType.NVarChar).Value = dwData["LMSBEM"].ToString(); 
          or1.Parameters.Add("LMSLO", OracleType.NVarChar).Value = dwData["LMSLO"].ToString(); 
          or1.Parameters.Add("LMSLB", OracleType.NVarChar).Value = dwData["LMSLB"].ToString(); 
          or1.Parameters.Add("LMSLP", OracleType.NVarChar).Value = dwData["LMSLP"].ToString(); 
          or1.Parameters.Add("LMSAUFBKZ", OracleType.NVarChar).Value = dwData["LMSAUFBKZ"].ToString(); 
          or1.Parameters.Add("LMSANZPART", OracleType.NVarChar).Value = dwData["LMSANZPART"].ToString(); 
          or1.Parameters.Add("LMSGESMTR", OracleType.NVarChar).Value = dwData["LMSGESMTR"].ToString(); 
          or1.Parameters.Add("LMSWALZNR", OracleType.NVarChar).Value = dwData["LMSWALZNR"].ToString(); 
          or1.Parameters.Add("LMSRAPPH", OracleType.NVarChar).Value = dwData["LMSRAPPH"].ToString(); 
          or1.Parameters.Add("LMSRAPPB", OracleType.NVarChar).Value = dwData["LMSRAPPB"].ToString(); 
          or1.Parameters.Add("LMSSCHABTYP", OracleType.NVarChar).Value = dwData["LMSSCHABTYP"].ToString(); 
          or1.Parameters.Add("LMSHUELTYP", OracleType.NVarChar).Value = dwData["LMSHUELTYP"].ToString(); 
          or1.Parameters.Add("LMSENDRTYP", OracleType.NVarChar).Value = dwData["LMSENDRTYP"].ToString(); 
          or1.Parameters.Add("LMSDESS", OracleType.NVarChar).Value = dwData["LMSDESS"].ToString(); 
          or1.Parameters.Add("LMSPOS1", OracleType.NVarChar).Value = dwData["LMSPOS1"].ToString(); 
          or1.Parameters.Add("LMSPOS2", OracleType.NVarChar).Value = dwData["LMSPOS2"].ToString(); 
          or1.Parameters.Add("LMSPOS3", OracleType.NVarChar).Value = dwData["LMSPOS3"].ToString(); 
          or1.Parameters.Add("LMSPOS4", OracleType.NVarChar).Value = dwData["LMSPOS4"].ToString(); 
          or1.Parameters.Add("LMSPOS5", OracleType.NVarChar).Value = dwData["LMSPOS5"].ToString(); 
          or1.Parameters.Add("LMSPOS6", OracleType.NVarChar).Value = dwData["LMSPOS6"].ToString(); 
          or1.Parameters.Add("LMSPOS7", OracleType.NVarChar).Value = dwData["LMSPOS7"].ToString(); 
          or1.Parameters.Add("LMSPOS8", OracleType.NVarChar).Value = dwData["LMSPOS8"].ToString(); 
          or1.Parameters.Add("LMSPOS9", OracleType.NVarChar).Value = dwData["LMSPOS9"].ToString(); 
          or1.Parameters.Add("LMSPOS10", OracleType.NVarChar).Value = dwData["LMSPOS10"].ToString(); 
          or1.Parameters.Add("LMSBAUART", OracleType.NVarChar).Value = dwData["LMSBAUART"].ToString(); 
          or1.Parameters.Add("LMSGRAVART", OracleType.NVarChar).Value = dwData["LMSGRAVART"].ToString(); 
          or1.Parameters.Add("LMSABDRDAT", OracleType.NVarChar).Value = dwData["LMSABDRDAT"].ToString(); 
          or1.Parameters.Add("LMSABDRLNR", OracleType.NVarChar).Value = dwData["LMSABDRLNR"].ToString(); 
          or1.Parameters.Add("LMSVOHA", OracleType.NVarChar).Value = dwData["LMSVOHA"].ToString(); 
          or1.Parameters.Add("LMSSTEPS1", OracleType.NVarChar).Value = dwData["LMSSTEPS1"].ToString(); 
          or1.Parameters.Add("LMSSTEPS2", OracleType.NVarChar).Value = dwData["LMSSTEPS2"].ToString(); 
          or1.Parameters.Add("LMSSTEPS3", OracleType.NVarChar).Value = dwData["LMSSTEPS3"].ToString(); 
          or1.Parameters.Add("LMSSTEPS4", OracleType.NVarChar).Value = dwData["LMSSTEPS4"].ToString(); 
          or1.Parameters.Add("LMSSTEPS5", OracleType.NVarChar).Value = dwData["LMSSTEPS5"].ToString(); 
          or1.Parameters.Add("LMSSTEPS6", OracleType.NVarChar).Value = dwData["LMSSTEPS6"].ToString(); 
          or1.Parameters.Add("LMSSTEPS7", OracleType.NVarChar).Value = dwData["LMSSTEPS7"].ToString(); 
          or1.Parameters.Add("LMSSTEPS8", OracleType.NVarChar).Value = dwData["LMSSTEPS8"].ToString(); 
          or1.Parameters.Add("LMSSTEPS9", OracleType.NVarChar).Value = dwData["LMSSTEPS9"].ToString(); 
          or1.Parameters.Add("LMSSTEPS10", OracleType.NVarChar).Value = dwData["LMSSTEPS10"].ToString(); 
          or1.Parameters.Add("LMSZUSTAND", OracleType.NVarChar).Value = dwData["LMSZUSTAND"].ToString(); 
          or1.Parameters.Add("LMSANZSCHAB", OracleType.NVarChar).Value = dwData["LMSANZSCHAB"].ToString(); 
          or1.Parameters.Add("LMSREPDAT", OracleType.NVarChar).Value = dwData["LMSREPDAT"].ToString(); 
          or1.Parameters.Add("LMSZURDAT", OracleType.NVarChar).Value = dwData["LMSZURDAT"].ToString(); 
          or1.Parameters.Add("LMSFILLER", OracleType.NVarChar).Value = dwData["LMSFILLER"].ToString(); 
          or1.Parameters.Add("LMSAENDZL", OracleType.NVarChar).Value = dwData["LMSAENDZL"].ToString(); 
          or1.Parameters.Add("LMSAENDBEN", OracleType.NVarChar).Value = dwData["LMSAENDBEN"].ToString(); 
          or1.Parameters.Add("LMSAENDDAT", OracleType.NVarChar).Value = dwData["LMSAENDDAT"].ToString(); 
          or1.Parameters.Add("LMSNEUBEN", OracleType.NVarChar).Value = dwData["LMSNEUBEN"].ToString(); 
          or1.Parameters.Add("LMSNEUDAT", OracleType.NVarChar).Value = dwData["LMSNEUDAT"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
